package com.example.administrator.mysaft;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by usernamee on 2017/6/20.
 */

public class BootCompleteReciever extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {
//        开机广播，判断流量是否开启，如果没有开启则开启
        if (!SystemInfoUtils.isServiceRunning(context,"com.example.administrator.mysaft.TrafficMonitoringService")){
            context.startService(new Intent(context,TrafficMonitoringService.class));
        }
    }
}
